import OverlayBase from './overlayBase';

class CanvasMarkersOverlay extends OverlayBase {
  constructor(options) {
    super(options);
    let { payload, style, positions } = options;
    let defaultOpt = {
      color: 'rgba(255,66,87,0.9)',
      ...style,
      payload,
    };
    // console.log('进来了', defaultOpt)?
    let myIcon = L.icon({
      iconSize: [20, 20],
      iconAnchor: [10, 9],
      iconUrl: defaultOpt?.iconUrl,
      // html: `<div style="color:${defaultOpt?.labelStyle?.color};">${label}</div>`,?
    });
    // return L.marker(centerPosition, { icon: myIcon });
    // this._lft = L.marker(positions, { ...defaultOpt });
    this._lft = L.marker(positions, { icon: myIcon });
  }
}

export default CanvasMarkersOverlay;
